# 创建手动的django运行环境，代替django shell，而不需要正式运行整个框架

import os
import django


os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'application.settings')
django.setup()

if 1:
    from station.utils.excelTodb import ExcelToDb
    from station.models import Station
    print(Station._meta.db_table)

    e2d = ExcelToDb()
    df = e2d.read_excel()
    e2d.excel_to_db(df, Station)
